<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../css/element.css" rel="stylesheet"/>
    <link href="../css/styleindex.css" rel="stylesheet"/>
    <style>

    </style>
</head>
<body style="background:#EFF0F4;">

  <div class="mui-content">
    <div id="vm" class="x-examok" v-cloak>
      <div class="x-header-g" id="header">
        <a class="x-header-arrow" @click="api.closeWin()"></a>
        <div class="x-header-t">{{thtitle}}</div>
      </div>
      <!--  -->
      <el-table :data="tabledata" @cell-click="gotrainpro">
        <el-table-column label="门店" width="" fixed>
          <template slot-scope="scope">
            {{scope.row.shop_title}}
          </template>
        </el-table-column>
        <el-table-column label="姓名" width="">
          <template slot-scope="scope">
            {{scope.row.username}}
          </template>
        </el-table-column>
        <el-table-column label="现职位" width="">
          <template slot-scope="scope">
            {{scope.row.now_level}}
          </template>
        </el-table-column>
        <el-table-column label="职级名称" width="">
          <template slot-scope="scope">
            {{scope.row.level_title}}
          </template>
        </el-table-column>
        <el-table-column label="晋升时间" width="">
          <template slot-scope="scope">
            {{scope.row.finish_time}}
          </template>
        </el-table-column>
        <el-table-column label="带训人" width="">
          <template slot-scope="scope">
            {{scope.row.take_username}}
          </template>
        </el-table-column>
        <el-table-column label="考核人" width="">
          <template slot-scope="scope">
            {{scope.row.exam_username}}
          </template>
        </el-table-column>
      </el-table>
      <!--  -->
      <el-dialog
        title="提示"
        :visible.sync="dialogVisible"
        width="80%">
        <!--  -->
        <el-descriptions title="成长轨迹">
            <el-descriptions-item label="职级">{{desc1}}</el-descriptions-item>
            <el-descriptions-item label="职级名称">{{desc2}}</el-descriptions-item>
            <el-descriptions-item label="晋升时间">{{desc3}}</el-descriptions-item>
            <el-descriptions-item label="带训人">{{desc4}}</el-descriptions-item>
            <el-descriptions-item label="考核人">{{desc5}}</el-descriptions-item>
        </el-descriptions>

        <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
        </span>
      </el-dialog>
    </div>
  </div>

  <script type="text/javascript" src="../script/vue.js"></script>
  <script type="text/javascript" src="../script/element.js"></script>
  <script type="text/javascript" src="../script/api.js"></script>
  <script type="text/javascript" src="../script/base.js"></script>
	<script>
apiready = function () {
    $api.fixStatusBar($api.byId('header'));
    var tid = api.pageParam.id;
    var ttitle = api.pageParam.title;
    var ttime = api.pageParam.date;
    var ttype = api.pageParam.type;

    //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{
            thid:'',
            thtitle:'',
            tabledata:[],
            dialogVisible:false,
            desc1:'',
            desc2:'',
            desc3:'',
            desc4:'',
            desc5:'',
            thtime:'',
            thtype:'',
        }
      },
      created:function() {
        var that=this;


      },
      mounted:function(){
        var that=this;
        that.thid = tid;
        that.thtitle = ttitle;
        that.thtime = ttime;
        that.thtype = ttype;
        that.getdata()

      },
      methods: {
        //
        getdata:function(){
          var  that=this;
          api.ajax({
            url:baseurl+'api/person/comInfojoblevel',
            methods:'get',
            data:{
              values:{
                sec: $api.getStorage('apptoken'),
                _gid:$api.getStorage('groupid'),
                date:that.thtime,
                type:that.thtype,
                levelid:that.thid
              }
            }
          },function(ret,err){
            if(ret){
              api.hideProgress();
              console.log(JSON.stringify(ret));
              if(ret.status == 1){
                that.tabledata = ret.data.list;
                  
              }else{
                api.toast({
                    msg: ret.msg,
                    duration: 3000,
                    location: 'bottom'
                });
              }
            }else{
              api.hideProgress();
              console.log(JSON.stringify(err));
              api.toast({
                  msg: err.msg,
                  duration: 3000,
                  location: 'bottom'
              });
            }
          })
        },
        //
        gotrainpro:function(val){
            var that = this;
            console.log(JSON.stringify(val));
            // that.dialogVisible = true;

        },
      }
    })
	}


	</script>
</body>
</html>
